const http = require('http')

let server = http.createServer()

server.listen(7000, () => {
    console.log('端口 7000')
})

server.on('request', function (req, res) {
    console.log('---server--')
    // console.log(req, res)
    // res.setHeader('COntent-type', 'text/plain; charset=utf-8')
    res.setHeader('COntent-type', 'text/html; charset=utf-8')
    res.write('<h1>你好</h1>')
    res.end()
})